#!/usr/bin/python
#Auther : MillionLee

'''

'''

from datetime import timedelta, datetime, tzinfo

class GMTplus8(tzinfo):
    def __init__(self):
        d = datetime(dt.year, 4, 1)
        self.dston = d - timedelta(days=d.weekday() + 1)
        d = datetime(dt.year, 11, 1)
        self.dstoff = d - timedelta(days=d.weekday() + 1)
    def utcoffset(self, dt):
        return timedelta(hours=1) + self.dst(dt)
    def dst(self, dt):
        if self.dston <=  dt.replace(tzinfo=None) < self.dstoff:
            return timedelta(hours=8)
        else:
            return timedelta(0)
    def tzname(self,dt):
        return "GMT +8"
        
if __name__ == "__main__":
    tmptz = GMTplus8()
